<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 300px;
            height: 300px;
            background-color: pink;
        }
        .son {
            width: 200px;
            height: 200px;
            background-color: purple;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <!-- 
        mouseenter 鼠标事件：
                     当鼠标移动到元素上时就会触发mouseenter事件
                     类似mouseover,他们两者之间的差别是
                     mouseover鼠标经过自身盒子触发，经过子盒子还触发。mouseenter只会经过自身盒子触发
                     之所以这样，就是因为mouseenter不会冒泡。
                     跟mouseover搭配鼠标离开mouseleave 同样不会冒泡
     -->
    <script>
        var father = document.querySelector('.father');
        var son = document.querySelector('.son');
        father.addEventListener('mouseover', function() {
            console.log('this.mouseleave', 111);
        })
        
    </script>
</body>
</html><!--  -->